/**
 * 
 */
package com.wsd.util;

import javax.servlet.ServletContext;


/**
 * @author 小e
 *
 * 2010-1-7 下午03:19:21
 */
public class WebApplicationContextUtils {
	private static ServletContext servletContext;
	
	public static ServletContext getServletContext() {
		return servletContext;
	}

	public static void setServletContext(ServletContext servletContext) {
		WebApplicationContextUtils.servletContext = servletContext;
	}

	public static Object getBean(String id){
		return org.springframework.web.context.support.WebApplicationContextUtils.getWebApplicationContext(servletContext).getBean(id);
	}
}
